#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
#include <cstring>
using namespace std;

int main()
{
    char str1[100];
    char str2[100];
    char str3[100];

    gets_s(str1, 100);
    gets_s(str2, 100);

    int len1 = strlen(str1);
    int len2 = strlen(str2);

    int flag = 1;
    int count = 0;
    for (int i = 0; i < len1; i++)
    {
        for (int j = 0; j < len2; j++)
        {
            if (str1[i] == str2[j])
            {
                flag = 0;
                break;
            }
        }
        if (flag == 1)
        {
            str3[count++] = str1[i];
        }
        flag = 1;
    }

    str3[count] = '\0';
    printf("%s", str3);
    return 0;
}